/*
 * ============================================================================
 *                   GNU Lesser General Public License
 * ============================================================================
 *
 *
 *
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307, USA.
 *
 *
 *
 */
package rad.framework.seam;

import java.io.OutputStream;
import java.util.List;

import rad.framework.richfaces.EntityTreeNode;

/**
 * The local interface for an Editor user interface.
 * 
 * @author boudyacho
 * @version 1.0
 * @generated
 */
public abstract interface AbstractEditor<E> {

	void setInstance(E instance);
	E newInstance();
	void setTreeNode(EntityTreeNode<E> treeNode);
	EntityTreeNode<E> getTreeNode();
	void clear();
	
	void getExportXml(OutputStream os);
	
	void create();

	void destroy();

	String cancelEdit();

	String cancelEditAndEnd();

	String validate();
	
	E quickAdd();
	
	boolean save(E instance);
	
	String save();

	String saveAndEnd();

	boolean delete(E instance);
	
	String delete();

	String deleteAndEnd();

	String deleteBeginAndEnd();

	boolean isEndConversation();
	
	boolean isTop();
	
	boolean isCurrentNode();
	
	boolean isViewMode();
	
	boolean isEditMode();
	
	boolean isRenderDelete();
	
	boolean isRenderExport();

	boolean isManaged();

	boolean isRenderPrint();

	boolean isRenderCharts();

	boolean isRenderCreate();

	boolean isRenderView();

	boolean isRenderEdit();

	boolean isRenderEdit(E instance);

	boolean isRenderDelete(E instance);
	
	boolean isRenderCreateClone();

	Object getId();

	void setRequestedId(String id);
	
	String getRequestedId();
	
	E getInstance();

	String getName();

	String getCurrentUserName();
	
	// ------------------------------------
	// workflow related
	// ------------------------------------
	
	List<ActionMetadata> getStatusActions();
}
